package su.order.service;
import java.util.List;
import java.util.Map;
import org.springframework.ui.Model;

import su.order.dto.OrderDto;
import su.order.entity.OrderEntity;


public interface OrderService {
	
	/**
	 * 订单分页查询
	 * @param orderDto 订单Dto
	 * @return 订单信息列表
	 * @throws Exception
	 */
	public List<Map<String,Object>> queryOrderByPage(OrderDto orderDto, Model model) throws Exception;
	
	/**
	 * 查询单个订单对象基本信息
	 * @param orderId订单id
	 * @return 订单
	 * @throws Exception
	 */
	public OrderEntity getOrderBaseInfoById(int orderId) throws Exception;
	
	/**
	 * 查询单个订单对象全部信息
	 * @param orderId
	 * @return
	 * @throws Exception
	 */
	public OrderEntity getOrderAllInfoById(int orderId) throws Exception;
	
//	/**
//	 * 设置订单的各订单项的运费
//	 * @param orderId
//	 * @throws Exception
//	 */
//	public void setOrderProductFreight(int orderId)throws Exception;
//	
//	/**
//	 * 设置订单的各订单项的理论提成
//	 * @param orderId
//	 * @throws Exception
//	 */
//	public void setOrderProductPayment(int orderId)throws Exception;
//
//	/**
//	 * 设置订单的各订单项的税金
//	 * @param orderId
//	 * @throws Exception
//	 */
//	public void setOrderProductTax(int orderId)throws Exception;
//
//	/**
//	 * 设置订单的各订单项的利润
//	 * @param orderId
//	 * @throws Exception
//	 */
//	public void setOrderProductMargin(int orderId)throws Exception;
	
	/**
	 * 保存或更新订单
	 * @param orderDto
	 * @throws Exception
	 */
	public void saveOrder(OrderDto orderDto, Model model) throws Exception;
	
	/**
	 * 删除订单
	 * @param orderId
	 * @param msgs
	 * @throws Exception
	 */
	public void destroyOrder(int orderId, Map<String,String> msgs) throws Exception;
	
	/**
	 * 修改订单统计信息、各订单项相应计算信息
	 * @param orderId
	 * @throws Exception
	 */
	public void updateOrderTotalInfos(int orderId) throws Exception;

}
